package com.youlai.boot.system.model.form;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 出票数据表单对象
 *
 * @author lwb
 * @since 2025-06-29 22:35
 */
@Getter
@Setter
@Schema(description = "出票数据表单对象")
public class SpotRecordForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    private Long id;

    @Schema(description = "旅行社Id")
    @NotNull(message = "旅行社名称不能为空")
    private Long deptId;

    @Schema(description = "旅行社名称")
    //@Length(max=64, message="旅行社名称长度不能超过64个字符")
    private String deptName;

    @Schema(description = "出票时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime outTime;

    @Schema(description = "出票日期")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime outDate;

    @Schema(description = "分类Id")
    @NotNull(message = "分类名称不能为空")
    private Long categoryId;

    @Schema(description = "分类名称")
    //@Length(max=64, message="分类名称长度不能超过64个字符")
    private String categoryName;

    @Schema(description = "出票数量")
    @Min(value=1, message="出票数量必须大于0")
    @NotNull(message = "出票数量不能为空")
    @Max(value=99999999, message="出票数量不能大于99999999")
    private Integer num;

    @Schema(description = "车牌号码")
    @Length(max=64, message="车牌号码长度不能超过64个字符")
    private String carNo;

    @Schema(description = "导游姓名")
    @Length(max=64, message="导游姓名长度不能超过64个字符")
    private String guideName;

    @Schema(description = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "出票人")
    private String userName;


}
